package com.kaisafax.parse;

import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import com.google.gson.Gson;
import com.kaisafax.parse.model.ApproveInfo;
import com.kaisafax.parse.model.BLDesc;
import com.kaisafax.parse.model.BLMort;
import com.kaisafax.parse.model.BusinessDesc;
import com.kaisafax.parse.model.BusinessMort;
import com.kaisafax.parse.model.DFXFDesc;
import com.kaisafax.parse.model.DFXFInfo;
import com.kaisafax.parse.model.DFXFMort;
import com.kaisafax.parse.model.OwnerDesc;
import com.kaisafax.parse.model.OwnerInfo;
import com.kaisafax.parse.model.OwnerMort;

/**
 * @date 2016年11月9日 下午8:25:23
 * @author pengyueyang TODO
 **/

public class ParseUtils {

	public static final String LEFT_P = "<";
	public static final String RIGHT_P = ">";
	private static final String regEx_style = "<style[^>]*?>[\\s\\S]*?<\\/style>"; // 定义style的正则表达式  
	private static Gson gson = new Gson();
	private static final String regex="[0-9]+?";
	private static final Pattern p=Pattern.compile(regex);
	/**
	 * 解析票据标项目详情
	 * 
	 * @return
	 */
	public static String parseBusinessDesc(String desc) {
		try {
			String keyOne = "项目信息：";
			String keyTwo = "企业信息：";
			StringBuilder projectInfo = new StringBuilder();
			StringBuilder companyInfo = new StringBuilder();
			StringBuilder strBuilder = new StringBuilder();
			List<String> textConent = new ArrayList<String>();
			for (int i = 0; i < desc.length(); i++) {
				if (LEFT_P.equals(String.valueOf(desc.charAt(i))) && strBuilder.toString().length() > 0) {
					textConent.add(strBuilder.toString());
					strBuilder = new StringBuilder(LEFT_P);
				} else if (RIGHT_P.equals(String.valueOf(desc.charAt(i))) && strBuilder.toString().length() > 0) {
					strBuilder = new StringBuilder("");
				} else {
					strBuilder.append(desc.charAt(i));
				}
			}
			int countIndex = 0;
			for (int i = 0; i < textConent.size(); i++) {
				if (keyOne.equals(textConent.get(i))) {
					continue;
				}
				if (keyTwo.equals(textConent.get(i))) {
					countIndex = 1;
					continue;
				}
				if (countIndex == 0) {
					if (projectInfo.toString().length() > 0) {
						projectInfo.append("\n");
					}
					projectInfo.append(textConent.get(i));

				}
				if (countIndex == 1) {
					if (companyInfo.toString().length() > 0) {
						companyInfo.append("\n");
					}
					companyInfo.append(textConent.get(i));
				}
			}
			BusinessDesc businessDesc = new BusinessDesc(projectInfo.toString(), companyInfo.toString());

			return gson.toJson(businessDesc);
		} catch (Exception e) {

			e.printStackTrace();
		}
		return null;
	}

	/**
	 * 解析票据标项目详情
	 * 
	 * @return
	 */
	public static String parseBusinessRiskInfo(String mortInfo) {
		try {
			
			 
	        Pattern p_style = Pattern.compile(regEx_style, Pattern.CASE_INSENSITIVE);  
	        Matcher m_style = p_style.matcher(mortInfo);  
	        mortInfo = m_style.replaceAll(""); // 过滤style标签  
	        mortInfo = mortInfo.replace("&nbsp;", "");
			String keyOne = "审核信息";
			String keyTwo = "兑付信息";
			String keyThree = "风控措施";
			StringBuilder convertInfo = new StringBuilder();
			StringBuilder riskInfo = new StringBuilder();
			List<ApproveInfo> approveInfoList = new ArrayList<ApproveInfo>();
			StringBuilder strBuilder = new StringBuilder();
			List<String> textConent = new ArrayList<String>();
			for (int i = 0; i < mortInfo.length(); i++) {
				if (LEFT_P.equals(String.valueOf(mortInfo.charAt(i))) && strBuilder.toString().length() > 0) {
					if(!"审核项目".equals(strBuilder.toString())&&
					   !"状态".equals(strBuilder.toString())	&&
					   !"通过日期".equals(strBuilder.toString())) {
						textConent.add(strBuilder.toString());
					}
					strBuilder = new StringBuilder(LEFT_P);
				} else if (RIGHT_P.equals(String.valueOf(mortInfo.charAt(i))) && strBuilder.toString().length() > 0) {
					strBuilder = new StringBuilder("");
				} else {
					strBuilder.append(mortInfo.charAt(i));
				}
			}
			int countIndex = 0;
			int count = 0;
			String approveName = "";
			String status = "";
			String date = "";
			for (int i = 0; i < textConent.size(); i++) {
				if (keyOne.equals(textConent.get(i))) {
					continue;
				}
				if (keyTwo.equals(textConent.get(i))) {
					countIndex = 1;
					continue;
				}
				if (keyThree.equals(textConent.get(i))) {
					countIndex = 2;
					continue;
				}
				if (countIndex == 0 && !"".equals(textConent.get(i).trim())) {
					if (count == 0) {
						approveName = textConent.get(i);
						count++;
						continue;
					}
					if (count == 1) {
						status = textConent.get(i);
						count++;
						continue;
					}
					if (count == 2) {
						Matcher m=p.matcher(textConent.get(i));
						if (m.find()==true) {
							date += textConent.get(i);
						} else {
							approveInfoList.add(new ApproveInfo(approveName, status, date));
							approveName = textConent.get(i);
							date="";
							count=1;
						}
					}


				}
				if (countIndex == 1 && !"".equals(textConent.get(i).trim())) {
					if (convertInfo.toString().length() > 0) {
						convertInfo.append("\n");
					}
					convertInfo.append(textConent.get(i));

				}
				if (countIndex == 2 && !"".equals(textConent.get(i).trim())) {
					if (riskInfo.toString().length() > 0) {
						riskInfo.append("\n");
					}
					riskInfo.append(textConent.get(i));
				}
			}
			BusinessMort businessMort = new BusinessMort(approveInfoList, convertInfo.toString(), riskInfo.toString());

			return gson.toJson(businessMort);
		} catch (Exception e) {

			e.printStackTrace();
		}
		return null;
	}

	public static String parseBLDesc(String desc) {
		try {
			StringBuilder projectInfo = new StringBuilder();
			StringBuilder strBuilder = new StringBuilder();
			List<String> textConent = new ArrayList<String>();
			for (int i = 0; i < desc.length(); i++) {
				if (LEFT_P.equals(String.valueOf(desc.charAt(i))) && strBuilder.toString().length() > 0) {
					textConent.add(strBuilder.toString());
					strBuilder = new StringBuilder(LEFT_P);
				} else if (RIGHT_P.equals(String.valueOf(desc.charAt(i))) && strBuilder.toString().length() > 0) {
					strBuilder = new StringBuilder("");
				} else {
					strBuilder.append(desc.charAt(i));
				}
			}
			int countIndex = 0;
			for (int i = 0; i < textConent.size(); i++) {
				if(!"".equals(textConent.get(i).trim())) {
					if (projectInfo.toString().length() > 0) {
						projectInfo.append("\n");
					}
					projectInfo.append(textConent.get(i));
				}
			}
			BLDesc bLDesc = new BLDesc(projectInfo.toString());
			return gson.toJson(bLDesc);
		} catch (Exception e) {

			e.printStackTrace();
		}
		return null;
	}
	
	
	
	public static String parseBLMort(String blMort) {
		try {
			StringBuilder mortInfo = new StringBuilder();
			StringBuilder strBuilder = new StringBuilder();
			List<String> textConent = new ArrayList<String>();
			for (int i = 0; i < blMort.length(); i++) {
				if (LEFT_P.equals(String.valueOf(blMort.charAt(i))) && strBuilder.toString().length() > 0) {
					textConent.add(strBuilder.toString());
					strBuilder = new StringBuilder(LEFT_P);
				} else if (RIGHT_P.equals(String.valueOf(blMort.charAt(i))) && strBuilder.toString().length() > 0) {
					strBuilder = new StringBuilder("");
				} else {
					strBuilder.append(blMort.charAt(i));
				}
			}
			int countIndex = 0;
			for (int i = 0; i < textConent.size(); i++) {
				if(!"".equals(textConent.get(i).trim())) {
					if (mortInfo.toString().length() > 0) {
						mortInfo.append("\n");
					}
					mortInfo.append(textConent.get(i));
				}
			}
			BLMort bLMort = new BLMort(mortInfo.toString());
			return gson.toJson(bLMort);
		} catch (Exception e) {

			e.printStackTrace();
		}
		return null;
	}
 
	
	/**
	 * 解析达飞消费标项目详情
	 * 
	 * @return
	 */
	public static String parseDFXFDesc(String dfxfDesc) {
		try {
			
			 
	        Pattern p_style = Pattern.compile(regEx_style, Pattern.CASE_INSENSITIVE);  
	        Matcher m_style = p_style.matcher(dfxfDesc);  
	        dfxfDesc = m_style.replaceAll(""); // 过滤style标签  
	        dfxfDesc = dfxfDesc.replace("&nbsp;", "");
			String keyOne = "基本信息";
			String keyTwo = "产品内涵";
			String keyThree = "产品说明";
			String keyFour = "征信档案情况";
			String keyFive = "回购方实力";
			StringBuilder convertInfo = new StringBuilder();
			StringBuilder riskInfo = new StringBuilder();
			List<DFXFInfo> dfxfInfoList = new ArrayList<DFXFInfo>();
			StringBuilder strBuilder = new StringBuilder();
			List<String> textConent = new ArrayList<String>();
			for (int i = 0; i < dfxfDesc.length(); i++) {
				if (LEFT_P.equals(String.valueOf(dfxfDesc.charAt(i))) && strBuilder.toString().length() > 0) {
					textConent.add(strBuilder.toString());
					strBuilder = new StringBuilder(LEFT_P);
				} else if (RIGHT_P.equals(String.valueOf(dfxfDesc.charAt(i))) && strBuilder.toString().length() > 0) {
					strBuilder = new StringBuilder("");
				} else {
					strBuilder.append(dfxfDesc.charAt(i));
				}
			}
			
			String key = "";
			StringBuilder value = new StringBuilder();
			int countIndex = 0;
			for (int i = 0; i < textConent.size(); i++) {
				
				if (keyOne.equals(textConent.get(i))) {
					continue;
				}
				if (keyTwo.equals(textConent.get(i))) {
					dfxfInfoList.add(new DFXFInfo(keyOne, value.toString()));
					value = new StringBuilder();
					continue;
				}
				if (keyThree.equals(textConent.get(i))) {
					dfxfInfoList.add(new DFXFInfo(keyTwo, value.toString()));
					value = new StringBuilder();
					continue;
				}
				if (keyFour.equals(textConent.get(i))) {
					dfxfInfoList.add(new DFXFInfo(keyThree, value.toString()));
					value = new StringBuilder();
					continue;
				}
				if (keyFive.equals(textConent.get(i))) {
					dfxfInfoList.add(new DFXFInfo(keyFour, value.toString()));
					value = new StringBuilder();
					continue;
				}
				if(!"".equals(textConent.get(i).trim())) {
					if (value.toString().length() > 0) {
						value.append("\n");
					}
					value.append(textConent.get(i));
				}
				if(i==textConent.size()-1){
					dfxfInfoList.add(new DFXFInfo(keyFive, value.toString()));
					value = new StringBuilder();
				}
			}
			DFXFDesc sfxfDesc = new DFXFDesc(dfxfInfoList);

			return gson.toJson(sfxfDesc);
		} catch (Exception e) {

			e.printStackTrace();
		}
		return null;
	}
	
	
	/**
	 * 解析达飞消费标项目详情
	 * 
	 * @return
	 */
	public static String parseDFXFRiskInfo(String mortInfo) {
		try {
			
			 
	        Pattern p_style = Pattern.compile(regEx_style, Pattern.CASE_INSENSITIVE);  
	        Matcher m_style = p_style.matcher(mortInfo);  
	        mortInfo = m_style.replaceAll(""); // 过滤style标签  
	        mortInfo = mortInfo.replace("&nbsp;", "");
			String keyTwo = "风控措施";
			String keyThree = "还款来源";
			StringBuilder repaySource = new StringBuilder();
			StringBuilder riskInfo = new StringBuilder();
			List<ApproveInfo> approveInfoList = new ArrayList<ApproveInfo>();
			StringBuilder strBuilder = new StringBuilder();
			List<String> textConent = new ArrayList<String>();
			for (int i = 0; i < mortInfo.length(); i++) {
				if (LEFT_P.equals(String.valueOf(mortInfo.charAt(i))) && strBuilder.toString().length() > 0) {
					if(!"审核项目".equals(strBuilder.toString())&&
					   !"状态".equals(strBuilder.toString())	&&
					   !"通过日期".equals(strBuilder.toString())) {
						textConent.add(strBuilder.toString());
					}
					strBuilder = new StringBuilder(LEFT_P);
				} else if (RIGHT_P.equals(String.valueOf(mortInfo.charAt(i))) && strBuilder.toString().length() > 0) {
					strBuilder = new StringBuilder("");
				} else {
					strBuilder.append(mortInfo.charAt(i));
				}
			}
			int countIndex = 0;
			int count = 0;
			String approveName = "";
			String status = "";
			String date = "";
			for (int i = 0; i < textConent.size(); i++) {
				if (keyTwo.equals(textConent.get(i))) {
					countIndex = 1;
					continue;
				}
				if (keyThree.equals(textConent.get(i))) {
					countIndex = 2;
					continue;
				}
				if (countIndex == 0 && !"".equals(textConent.get(i).trim())) {
					if (count == 0) {
						approveName = textConent.get(i);
						count++;
						continue;
					}
					if (count == 1) {
						status = textConent.get(i);
						count++;
						continue;
					}
					if (count == 2) {
						Matcher m=p.matcher(textConent.get(i));
						if (m.find()==true) {
							date += textConent.get(i);
						} else {
							approveInfoList.add(new ApproveInfo(approveName, status, date));
							approveName = textConent.get(i);
							date="";
							count=1;
						}
					}


				}
				if (countIndex == 1 && !"".equals(textConent.get(i).trim())) {
					if (repaySource.toString().length() > 0) {
						repaySource.append("\n");
					}
					repaySource.append(textConent.get(i));

				}
				if (countIndex == 2 && !"".equals(textConent.get(i).trim())) {
					if (riskInfo.toString().length() > 0) {
						riskInfo.append("\n");
					}
					riskInfo.append(textConent.get(i));
				}
			}
			DFXFMort sfxfMort = new DFXFMort(approveInfoList, riskInfo.toString(), repaySource.toString());

			return gson.toJson(sfxfMort);
		} catch (Exception e) {

			e.printStackTrace();
		}
		return null;
	}

	/**
	 * 
	 * @param ownerDescInfo
	 * @return
	 */
	public static String parseOwnerDesc(String ownerDescInfo) {
		try {
			
			 
	        Pattern p_style = Pattern.compile(regEx_style, Pattern.CASE_INSENSITIVE);  
	        Matcher m_style = p_style.matcher(ownerDescInfo);  
	        ownerDescInfo = m_style.replaceAll(""); // 过滤style标签  
	        ownerDescInfo = ownerDescInfo.replace("&nbsp;", "");
			String keyOne = "基本信息";
			String keyTwo = "工作情况";
			String keyThree = "借款用途";
			String keyFour = "征信情况";
			String keyFive = "项目说明";
			List<OwnerInfo> ownerInfoList = new ArrayList<OwnerInfo>();
			StringBuilder strBuilder = new StringBuilder();
			List<String> textConent = new ArrayList<String>();
			for (int i = 0; i < ownerDescInfo.length(); i++) {
				if (LEFT_P.equals(String.valueOf(ownerDescInfo.charAt(i))) && strBuilder.toString().length() > 0) {
					textConent.add(strBuilder.toString());
					strBuilder = new StringBuilder(LEFT_P);
				} else if (RIGHT_P.equals(String.valueOf(ownerDescInfo.charAt(i))) && strBuilder.toString().length() > 0) {
					strBuilder = new StringBuilder("");
				} else {
					strBuilder.append(ownerDescInfo.charAt(i));
				}
			}
			
			String key = "";
			StringBuilder value = new StringBuilder();
			int countIndex = 0;
			for (int i = 0; i < textConent.size(); i++) {
				
				if (keyOne.equals(textConent.get(i))) {
					continue;
				}
				if (keyTwo.equals(textConent.get(i))) {
					ownerInfoList.add(new OwnerInfo(keyOne, value.toString()));
					value = new StringBuilder();
					continue;
				}
				if (keyThree.equals(textConent.get(i))) {
					ownerInfoList.add(new OwnerInfo(keyTwo, value.toString()));
					value = new StringBuilder();
					continue;
				}
				if (keyFour.equals(textConent.get(i))) {
					ownerInfoList.add(new OwnerInfo(keyThree, value.toString()));
					value = new StringBuilder();
					continue;
				}
				if (keyFive.equals(textConent.get(i))) {
					ownerInfoList.add(new OwnerInfo(keyFour, value.toString()));
					value = new StringBuilder();
					continue;
				}
				if(!"".equals(textConent.get(i).trim())) {
					if (value.toString().length() > 0) {
						value.append("\n");
					}
					value.append(textConent.get(i));
				}
				if(i==textConent.size()-1){
					ownerInfoList.add(new OwnerInfo(keyFive, value.toString()));
					value = new StringBuilder();
				}
			}
			OwnerDesc ownerDesc = new OwnerDesc(ownerInfoList);

			return gson.toJson(ownerDesc);
		} catch (Exception e) {

			e.printStackTrace();
		}
		return null;
	}
	
	/**
	 * 物业宝
	 * @param ownerInfo
	 * @return
	 */
	public static String parseOwnerRiskInfo(String ownerInfo) {
		try {
			
			 
	        Pattern p_style = Pattern.compile(regEx_style, Pattern.CASE_INSENSITIVE);  
	        Matcher m_style = p_style.matcher(ownerInfo);  
	        ownerInfo = m_style.replaceAll(""); // 过滤style标签  
	        ownerInfo = ownerInfo.replace("&nbsp;", "");
			String keyTwo = "风控措施";
			StringBuilder riskInfo = new StringBuilder();
			List<ApproveInfo> approveInfoList = new ArrayList<ApproveInfo>();
			StringBuilder strBuilder = new StringBuilder();
			List<String> textConent = new ArrayList<String>();
			for (int i = 0; i < ownerInfo.length(); i++) {
				if (LEFT_P.equals(String.valueOf(ownerInfo.charAt(i))) && strBuilder.toString().length() > 0) {
					if(!"审核项目".equals(strBuilder.toString())&&
					   !"状态".equals(strBuilder.toString())	&&
					   !"通过日期".equals(strBuilder.toString())&&
					   !"风险审核".equals(strBuilder.toString())) {
						textConent.add(strBuilder.toString());
					}
					strBuilder = new StringBuilder(LEFT_P);
				} else if (RIGHT_P.equals(String.valueOf(ownerInfo.charAt(i))) && strBuilder.toString().length() > 0) {
					strBuilder = new StringBuilder("");
				} else {
					strBuilder.append(ownerInfo.charAt(i));
				}
			}
			int countIndex = 0;
			int count = 0;
			String approveName = "";
			String status = "";
			String date = "";
			for (int i = 0; i < textConent.size(); i++) {
				if (keyTwo.equals(textConent.get(i))) {
					countIndex = 1;
					continue;
				}
				if (countIndex == 0 && !"".equals(textConent.get(i).trim())) {
					if (count == 0) {
						approveName = textConent.get(i);
						count++;
						continue;
					}
					if (count == 1) {
						status = textConent.get(i);
						count++;
						continue;
					}
					if (count == 2) {
						Matcher m=p.matcher(textConent.get(i));
						if (m.find()==true) {
							date += textConent.get(i);
						} else {
							approveInfoList.add(new ApproveInfo(approveName, status, date));
							approveName = textConent.get(i);
							date="";
							count=1;
						}
					}


				}
				if (countIndex == 1 && !"".equals(textConent.get(i).trim())) {
					if (riskInfo.toString().length() > 0) {
						riskInfo.append("\n");
					}
					riskInfo.append(textConent.get(i));
				}
			}
			OwnerMort ownerMort = new OwnerMort(approveInfoList, riskInfo.toString());

			return gson.toJson(ownerMort);
		} catch (Exception e) {

			e.printStackTrace();
		}
		return null;
	}
	
	public static void main(String[] args) {
		String desc = "<p><span style=\"font-family: 'Microsoft Yahei'; font-size: 14px; line-height: 20px;\"><span style=\"font-weight: bold; color: rgb(99, 99, 99);\">项目信息：</span></span><span style=\"color: rgb(99, 99, 99); font-family: 'Microsoft Yahei'; font-size: 14px; line-height: 20px;\">深圳国人通信股份有限公司到期无条件兑付</span></p><p><span style=\"font-family: 'Microsoft Yahei'; font-size: 14px; line-height: 20px; font-weight: bold; color: rgb(99, 99, 99);\">企业信息：</span><span style=\"color: rgb(99, 99, 99); font-family: 'Microsoft Yahei'; font-size: 14px; line-height: 20px;\"><p>国人通信公司成立于1999年，总部设在深圳，主要从事以射频技术为基础的无线通信产品的开发、生产与销售，为电信及广电运营商提供移动通信网络覆盖全面解决方案，为通信设备制造商提供系列化的基站射频解决方案，</p>服务的客户主要有中国移动、中国联通、中国电信、中广传播等运营商及华为、中兴、爱立信、诺西、大唐、普天等通信设备制造商。</span></p><p><br></p>";
		System.out.println(parseBusinessDesc(desc));
		//String riskDesc = "<style>    @media (max-width: 540px) { #fkcs { color: #666!important; font-size: 14px!important; } }</style><div style=\"line-height: 25px; color: #666;\">        <h2 style=\"margin: 15px 0 10px 0; color: #f34b00; font-size: 16px;\" id=\"fkcs\">审核信息</h2></div><table width=\"100%\" class=\"repayment_plan\" border=\"0\" cellspacing=\"1\" style=\"line-height: 30px;\" align=\"center\">    <thead>                <tr style=\"text-align: center;\">            <th width=\"40%\" style=\"text-align: center;\"><span style=\"font-family: '微软雅黑';\">审核项目</span></th>            <th width=\"30%\"><span style=\"font-family: '微软雅黑';\">状态</span></th>            <th width=\"30%\"><span style=\"font-family: '微软雅黑';\">通过日期</span></th>        </tr>    </thead>    <tbody>        <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: '微软雅黑';\">风控人工验票</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-bcb8b3490b8a4dbcfae2934cd4a1617b\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div></td>            <td><div><span style=\"font-family: Arial;\"> 2016-11</span>-09</div></td>        </tr>        <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: 'Microsoft Yahei';\">专用设备验票</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-1701c8b8d40e2c8a3073a729fc4f1f6c\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div></td>            <td><div><span style=\"font-family: Arial;\"> 2016-</span><span style=\"background-color: transparent;\">11</span><span style=\"background-color: transparent;\">-09</span></div></td>        </tr>        <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: 'Microsoft Yahei';\">托管银行验票</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-7c85cd278617290793b209a7a89babad\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div></td>            <td><div><span style=\"font-family: Arial;\"> 2016-</span><span style=\"background-color: transparent;\">11</span><span style=\"background-color: transparent;\">-09</span></div></td>        </tr>        <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: 'Microsoft Yahei';\">持票企业身份认证</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-a50222d0eb4cf488633b940fe334b025\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div></td>            <td><div><span style=\"font-family: Arial;\"> 2016-</span><span style=\"background-color: transparent;\">11</span><span style=\"background-color: transparent;\">-09</span></div></td>        </tr>        <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: 'Microsoft Yahei';\"> 承兑企业资质认证</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-0f0ecea3260ce569649dd0a2158a4134\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div></td>            <td><div><span style=\"font-family: Arial;\">2016-</span><span style=\"background-color: transparent;\">11</span><span style=\"background-color: transparent;\">-09</span><br></div></td> </tr> <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: 'Microsoft Yahei';\"> 票据真实贸易背景审核</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-0f0ecea3260ce569649dd0a2158a4134\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div></td>            <td><div><span style=\"font-family: Arial;\">2016-</span><span style=\"background-color: transparent;\">11</span><span style=\"background-color: transparent;\">-09</span><br></div></td>        </tr> <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: 'Microsoft Yahei';\"> 开票企业实地核验</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-0f0ecea3260ce569649dd0a2158a4134\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div></td>            <td><div><span style=\"font-family: Arial;\">2016-</span><span style=\"background-color: transparent;\">11</span><span style=\"background-color: transparent;\">-09</span><br></div></td>        </tr>    </tbody></table><div style=\"line-height: 25px; color: #666;\">        <h2 style=\"margin: 15px 0 10px 0; color: #f34b00; font-size: 16px;\" id=\"fkcs\">兑付信息</h2> <p>深圳国人通信股份有限公司到期无条件兑付</p></div><div style=\"line-height: 25px; color: #666;\">        <h2 style=\"margin: 15px 0 10px 0; color: #f34b00; font-size: 16px;\" id=\"fkcs\">风控措施</h2>    <p>风控措施一：该项目适用于风险备付金</p></div><style type=\"text/css\">    .tg  {        border-collapse:collapse;        border-spacing:0; }    .tg td{        font-family:微软雅黑, sans-serif;        font-size:14px;        padding:10px 5px;        overflow:hidden;        word-break:normal;}    .tg th{        font-family:微软雅黑, sans-serif;        font-size:14px;        font-weight:normal;        padding:10px 5px;        overflow:hidden;        word-break:normal;}    .tg .tg-baqh{        text-align:center;        vertical-align:top ;        line-height: 22px;        width:25%;}    .tg .tg-yw4l{        vertical-align:top;        line-height: 22px;    }</style>";
		String riskDesc = "<style>    @media (max-width: 540px) { #fkcs { color: #666!important; font-size: 14px!important; } }</style><div style=\"line-height: 25px; color: #666;\">        <h2 style=\"margin: 15px 0 10px 0; color: #f34b00; font-size: 16px;\" id=\"fkcs\">审核信息</h2></div><table width=\"100%\" class=\"repayment_plan\" border=\"0\" cellspacing=\"1\" style=\"line-height: 30px;\" align=\"center\">    <thead>                <tr style=\"text-align: center;\">            <th width=\"40%\" style=\"text-align: center;\"><span style=\"font-family: '微软雅黑';\">审核项目</span></th>            <th width=\"30%\"><span style=\"font-family: '微软雅黑';\">状态</span></th>            <th width=\"30%\"><span style=\"font-family: '微软雅黑';\">通过日期</span></th>        </tr>    </thead>    <tbody>        <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: '微软雅黑';\">风控人工验票</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-bcb8b3490b8a4dbcfae2934cd4a1617b\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div></td>            <td><div><span style=\"font-family: Arial;\"> 2016-11</span>-09</div></td>        </tr>        <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: 'Microsoft Yahei';\">专用设备验票</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-1701c8b8d40e2c8a3073a729fc4f1f6c\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div></td>            <td><div><span style=\"font-family: Arial;\"> 2016-</span><span style=\"background-color: transparent;\">11</span><span style=\"background-color: transparent;\">-09</span></div></td>        </tr>        <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: 'Microsoft Yahei';\">托管银行验票</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-7c85cd278617290793b209a7a89babad\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div></td>            <td><div><span style=\"font-family: Arial;\"> 2016-</span><span style=\"background-color: transparent;\">11</span><span style=\"background-color: transparent;\">-09</span></div></td>        </tr>        <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: 'Microsoft Yahei';\">持票企业身份认证</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-a50222d0eb4cf488633b940fe334b025\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div></td>            <td><div><span style=\"font-family: Arial;\"> 2016-</span><span style=\"background-color: transparent;\">11</span><span style=\"background-color: transparent;\">-09</span></div></td>        </tr>        <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: 'Microsoft Yahei';\"> 承兑企业资质认证</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-0f0ecea3260ce569649dd0a2158a4134\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div></td>            <td><div><span style=\"font-family: Arial;\">2016-</span><span style=\"background-color: transparent;\">11</span><span style=\"background-color: transparent;\">-09</span><br></div></td> </tr> <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: 'Microsoft Yahei';\"> 票据真实贸易背景审核</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-0f0ecea3260ce569649dd0a2158a4134\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div></td>            <td><div><span style=\"font-family: Arial;\">2016-</span><span style=\"background-color: transparent;\">11</span><span style=\"background-color: transparent;\">-09</span><br></div></td>        </tr> <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: 'Microsoft Yahei';\"> 开票企业实地核验</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-0f0ecea3260ce569649dd0a2158a4134\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div></td>            <td><div><span style=\"font-family: Arial;\">2016-</span><span style=\"background-color: transparent;\">11</span><span style=\"background-color: transparent;\">-09</span><br></div></td>        </tr>    </tbody></table><div style=\"line-height: 25px; color: #666;\">        <h2 style=\"margin: 15px 0 10px 0; color: #f34b00; font-size: 16px;\" id=\"fkcs\">兑付信息</h2> <p>大厂华夏幸福基业房地产开发有限公司到期无条件兑付</p></div><div style=\"line-height: 25px; color: #666;\">        <h2 style=\"margin: 15px 0 10px 0; color: #f34b00; font-size: 16px;\" id=\"fkcs\">风控措施</h2>    <p>风控措施一：该项目适用于风险备付金</p></div><style type=\"text/css\">    .tg  {        border-collapse:collapse;        border-spacing:0; }    .tg td{        font-family:微软雅黑, sans-serif;        font-size:14px;        padding:10px 5px;        overflow:hidden;        word-break:normal;}    .tg th{        font-family:微软雅黑, sans-serif;        font-size:14px;        font-weight:normal;        padding:10px 5px;        overflow:hidden;        word-break:normal;}    .tg .tg-baqh{        text-align:center;        vertical-align:top ;        line-height: 22px;        width:25%;}    .tg .tg-yw4l{        vertical-align:top;        line-height: 22px;    }</style>";
		System.out.println(parseBusinessRiskInfo(riskDesc));
		String blDesc = "<div style=\"line-height: 2;\"><span style=\"font-size: 14px; font-family: 微软雅黑; line-height: 30px; color: #353535;\"></span><span style=\"color: rgb(53, 53, 53); font-family: 微软雅黑; font-size: 14px; line-height: 30px;\">&nbsp; &nbsp; &nbsp; &nbsp;原债权人注册资本20亿元，拥有国家房屋建筑工程施工总承包一级、市政公用工程施工总承包三级、土石方工程专业承包三级，地基与基础工程专业承包三级资质。原债权人与原债务人某上市公司旗下子公司就某项目第四期工程签订了《建筑工程施工合同》，由原债权人向原债务人提供建筑施工，合同备案总价合计181611842元，按照合同约定的工程付款进度，当前施工进度已产生并核实的应收账款为72644737元，原债权人已与保理公司就此应收账款签订应收账款转让及回购协议。保理公司将此应收账款收益权于平台进行转让融资，融资额度5000万元，本期融资56万元。折价率仅为68.8%。</span></div>";
		System.out.println(parseBLDesc(blDesc));
		String blMort = "<p style=\"font-size: 14px; font-family: 微软雅黑; line-height: 30px; color: #353535;\"><span>1、应收账款审核：风控团队严格审核交易合同并实地考察，专业会计师核查原债权人财报及对账单，保证应收账款的真实性与合法性；</span></p><p style=\"font-size: 14px; font-family: 微软雅黑; line-height:30px; color: #353535;\"><span>2、交易双方尽职调查：背调团队针对原债务人及债权人进行包括但不限于经营情况调查，财务情况调查，债务情况调查，涉诉情况调查信用记录调查企业法定代表人和股东经历调查；</span></p><p style=\"font-size: 14px; font-family: 微软雅黑; line-height: 30px; color: #353535;\"><span>3、央行应收账款登记：通过央行应收账款质押公示登记系统办理转让登记确权；</span></p><p style=\"font-size: 14px; font-family: 微软雅黑; line-height: 30px; color: #353535;\"><span>4、应收账款账户监管：保理公司设立应收账款监管专户保证资金本息足额、按时偿还；</span></p><p><span style=\"color: rgb(53, 53, 53); font-family: 微软雅黑; font-size: 14px; line-height: 30px;\">5、折价率低，仅为68.8%。</span></p><p style=\"font-size: 14px; font-family: 微软雅黑; line-height: 30px; color: #353535;\"><span>6、多重还款来源：</span>  </p><p style=\"font-size: 14px; font-family: 微软雅黑; line-height: 30px; color: #353535;\"> <span>第一还款来源：原债务人为实力雄厚的大型上市公司旗下子公司，基于基础交易合同负有还款责任；</span></p> <p style=\"font-size: 14px; font-family: 微软雅黑; line-height: 30px; color: #353535;\">  <span>第二还款来源：保理公司风控能力强，基于应收账款转让及回购协议负有回购责任；</span></p> <p style=\"font-size: 14px; font-family: 微软雅黑; line-height: 30px; color: #353535;\">  <span>第三还款来源：此保理业务为有追索权类型，若原债务方未能及时回款，原债权人负有还款责任。</span></p><p></p><p style=\"font-size: 14px; font-family: 微软雅黑; line-height: 30px; color: #353535;\"><span>7、该项目适用于风险备付金。</span></p>";
		System.out.println(parseBLMort(blMort));
		String dfxfDesc = "<style type=\"text/css\">.tg  {border-collapse:collapse;border-spacing:0; }.tg td{font-family:微软雅黑, sans-serif;font-size:14px;padding:10px 5px;overflow:hidden;word-break:normal;}.tg th{font-family:微软雅黑, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;overflow:hidden;wordbreak:normal;}.tg .tg-baqh{text-align:center;vertical-align:top ;width:25%;line-height:20px;}.tg .tg-yw4l{vertical-align:top;line-height:20px;}</style><table class=\"tg\">  <tbody><tr>    <td class=\"tg-baqh\">基本信息</td>    <td class=\"tg-yw4l\">佳兆业金服佳盈消费产品为多个借款人现金消费信贷资产包转让类业务。</td>  </tr><tr>    <td class=\"tg-baqh\">产品内涵</td>    <td class=\"tg-yw4l\">现金消费贷款是针对有小额短期消费需求的客户，在严格的风控审核下，对信用记录优良且具有较好的还款能力和意愿的借款人，提供灵活便捷的现金分期金融服务，类似“淘宝借呗”。</td>  </tr>  <tr>    <td class=\"tg-baqh\">产品说明</td>    <td class=\"tg-yw4l\"><p>佳兆业金服佳盈消费（现金消费贷资产包）由专业金融服务机构深圳达飞金融控股有限公司甄选、审核后推荐至佳兆业金服平台，并承诺到期回购。本期转让金额为100万元，期限90天。</p></td>  </tr>  <tr>    <td class=\"tg-baqh\">征信档案情况</td>    <td class=\"tg-yw4l\">已查，征信状况良好，档案真实。</td>  </tr>  <tr>    <td class=\"tg-baqh\">回购方实力</td>    <td class=\"tg-yw4l\">注册资本金1亿元；中国消费金融领军品牌；荣获2015年度互联网最佳金融风控技术奖及责任品牌奖，AAA级信用企业。</td>  </tr></tbody></table>";
		System.out.println(parseDFXFDesc(dfxfDesc));
		String dfxfMort = "<p><br></p><style>    @media (max-width: 540px) { #fkcs { color: #666!important; font-size: 14px!important; } }</style><table width=\"100%\" class=\"repayment_plan\" border=\"0\" cellspacing=\"1\" style=\"line-height: 30px;\" align=\"center\">    <thead>                <tr style=\"text-align: center;\">            <th width=\"33.3%\" style=\"text-align: center;\"><span style=\"font-family: '微软雅黑';\">审核项目</span></th>            <th width=\"33.3%\"><span style=\"font-family: '微软雅黑';\">状态</span></th>            <th width=\"33.3%\"><span style=\"font-family: '微软雅黑';\">通过日期</span></th>        </tr>    </thead>    <tbody>        <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: '微软雅黑';\">达飞金控尽职调查</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-bcb8b3490b8a4dbcfae2934cd4a1617b\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div></td>            <td><div><span style=\"font-family: Arial;\"> 2016-08-10</span></div></td>        </tr>        <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: 'Microsoft Yahei';\">经营场所实地核验</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-1701c8b8d40e2c8a3073a729fc4f1f6c\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div></td>            <td><div><span style=\"font-family: Arial;\"> 2016-</span><span style=\"font-family: Arial; background-color: transparent;\">08-10</span></div></td>        </tr>        <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: 'Microsoft Yahei';\">达飞金控风控系统查验</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-7c85cd278617290793b209a7a89babad\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div></td>            <td><div><span style=\"font-family: Arial;\"> 2016-</span><span style=\"font-family: Arial; background-color: transparent;\">08-10</span></div></td>        </tr>        <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: 'Microsoft Yahei';\">达飞金控贷后体系考察</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-a50222d0eb4cf488633b940fe334b025\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div></td>            <td><div><span style=\"font-family: Arial;\"> 2016-</span><span style=\"font-family: Arial; background-color: transparent;\">08-10</span></div></td>        </tr> <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: 'Microsoft Yahei';\">转让资产清单核验</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-a50222d0eb4cf488633b940fe334b025\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div>            </td> <td><div><span style=\"font-family: Arial;\"> 2016-</span><span style=\"font-family: Arial; background-color: transparent;\">08-10</span></div></td></tr></tbody></table><div style=\"line-height: 25px; color: #666;\">        <h2 style=\"margin: 15px 0 10px 0; color: #f34b00; font-size: 16px;\" id=\"fkcs\">风控措施</h2>    <p>一：大数据风控：达飞金控自主研发现金消费贷特色审批系统，充分利用大数据分析技术、网络黑名单排查技术和第三方征信评测工具，实现对借款人的精准定位评级；</p>    <p>二：多重审核：达飞金控24小时系统自动初审和人工复审，同时佳兆业金服会对达飞资产包进行独立二次审核，保证债权真实、可靠、安全；</p>    <p>三：小额分散：客群下沉至三四线城市，单个借款人授信额度万元级别，单笔借款金额千元级别，客户借款按需申请随借随还，还款压力小，还款意愿强；</p>    <p>四：星级催收：360催收团队150余名专业人员采用专业催收系统跟踪作业，结合大数据系统采集的详实信息，保证催收及时、快速、准确，保障投资人权益。</p></div><style type=\"text/css\">    .tg  {        border-collapse:collapse;        border-spacing:0; }    .tg td{        font-family:微软雅黑, sans-serif;        font-size:14px;        padding:10px 5px;        overflow:hidden;        word-break:normal;}    .tg th{        font-family:微软雅黑, sans-serif;        font-size:14px;        font-weight:normal;        padding:10px 5px;        overflow:hidden;        word-break:normal;}    .tg .tg-baqh{        text-align:center;        vertical-align:top ;        line-height: 22px;        width:25%;}    .tg .tg-yw4l{        vertical-align:top;        line-height: 22px;    }</style><div style=\"line-height: 25px; color: #666;\">        <h2 style=\"margin: 15px 0 10px 0; color: #f34b00; font-size: 16px;\" id=\"fkcs\">还款来源</h2>    <p>一：借款人的薪资收入为第一还款来源；</p>    <p>二：转让方深圳达飞金融控股有限公司承诺到期回购此债权；</p>    <p>三：本平台已为此项目计提风险准备金。</p> </div>";
		System.out.println(parseDFXFRiskInfo((dfxfMort)));
		String ownerDesc = "<style type=\"text/css\">.tg  {border-collapse:collapse;border-spacing:0; }.tg td{font-family:微软雅黑, sans-serif;font-size:14px;padding:10px 5px;overflow:hidden;word-break:normal;}.tg th{font-family:微软雅黑, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;overflow:hidden;wordbreak:normal;}.tg .tg-baqh{text-align:center;vertical-align:top ;width:25%;line-height:20px;}.tg .tg-yw4l{vertical-align:top;line-height:20px;}</style><table class=\"tg\">  <tbody><tr>    <td class=\"tg-baqh\">基本信息</td>    <td class=\"tg-yw4l\">杨女士，26岁，现住广东深圳市，未婚</td>  </tr><tr>    <td class=\"tg-baqh\">工作情况</td>    <td class=\"tg-yw4l\">某大型上市公司员工，有稳定的收入来源</td>  </tr>  <tr>    <td class=\"tg-baqh\">借款用途</td>    <td class=\"tg-yw4l\">用于个人消费</td>  </tr>  <tr>    <td class=\"tg-baqh\">征信情况</td>    <td class=\"tg-yw4l\">个人征信报告已查，征信情况良好</td>  </tr>  <tr>    <td class=\"tg-baqh\">项目说明</td>    <td class=\"tg-yw4l\">本项目为个人消费信用贷款，借款人杨女士个人资质已通过审核，无不良征信记录，同时具有稳定的工作及收入来源，经济状况良好。</td>  </tr></tbody></table>";
		System.out.println(parseOwnerDesc((ownerDesc)));
		String ownerRisk = "<style>    @media (max-width: 540px) { #fkcs { color: #666!important; font-size: 14px!important; } }</style><table width=\"100%\" class=\"repayment_plan\" border=\"0\" cellspacing=\"1\" style=\"line-height: 30px;\" align=\"center\">    <thead>                <tr style=\"text-align: center;\">            <th width=\"33.3%\" style=\"text-align: center;\"><span style=\"font-family: '微软雅黑';\">审核项目</span></th>            <th width=\"33.3%\"><span style=\"font-family: '微软雅黑';\">状态</span></th>            <th width=\"33.3%\"><span style=\"font-family: '微软雅黑';\">通过日期</span></th>        </tr>    </thead>    <tbody>        <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: '微软雅黑';\">个人身份认证</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-bcb8b3490b8a4dbcfae2934cd4a1617b\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div></td>            <td><div><span style=\"font-family: Arial;\"> 2016-05-06</span></div></td>        </tr>        <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: 'Microsoft Yahei';\">个人信用报告</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-1701c8b8d40e2c8a3073a729fc4f1f6c\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div></td>            <td><div><span style=\"font-family: Arial;\"> 2016-0</span><span style=\"font-family: Arial; background-color: transparent;\">5-06</span></div></td>        </tr>        <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: 'Microsoft Yahei';\">  工作认证</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-7c85cd278617290793b209a7a89babad\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div></td>            <td><div><span style=\"font-family: Arial;\"> 2016-0</span><span style=\"font-family: Arial; background-color: transparent;\">5-06</span></div></td>        </tr>        <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: 'Microsoft Yahei';\">收入认证</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-a50222d0eb4cf488633b940fe334b025\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div></td>            <td><div><span style=\"font-family: Arial;\"> 2016-0</span><span style=\"font-family: Arial; background-color: transparent;\">5-06</span></div></td>        </tr>        <tr style=\"text-align: center;\">            <td><div style=\"text-align: center; \"><span style=\"font-family: 'Microsoft Yahei';\"> 住所认证</span></div></td>            <td><div><img style=\"width: 22px;\" src=\"http://optimus.b0.upaiyun.com/glyu-0f0ecea3260ce569649dd0a2158a4134\">&nbsp; &nbsp;<span class=\"pl10 text-green-color\" style=\"font-family: 'Microsoft Yahei'; color: rgb(107, 165, 74);\">已完成</span></div></td>            <td><div><span style=\"font-family: Arial;\">2016-0</span><span style=\"font-family: Arial; background-color: transparent;\">5-06</span><br></div></td>        </tr>    </tbody></table><div style=\"line-height: 25px; color: #666;\">        <h2 style=\"margin: 15px 0 10px 0; color: #f34b00; font-size: 16px;\" id=\"fkcs\">风控措施</h2>    <p>一：借款人的薪资收入为第一还款来源；</p>    <p>二：本平台已为此项目计提风险准备金。</p></div><style type=\"text/css\">    .tg  {        border-collapse:collapse;        border-spacing:0; }    .tg td{        font-family:微软雅黑, sans-serif;        font-size:14px;        padding:10px 5px;        overflow:hidden;        word-break:normal;}    .tg th{        font-family:微软雅黑, sans-serif;        font-size:14px;        font-weight:normal;        padding:10px 5px;        overflow:hidden;        word-break:normal;}    .tg .tg-baqh{        text-align:center;        vertical-align:top ;        line-height: 22px;        width:25%;}    .tg .tg-yw4l{        vertical-align:top;        line-height: 22px;    }</style>";
		System.out.println(parseOwnerRiskInfo((ownerRisk)));

	}
	
	
	
}
